<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"  
                      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:ui="http://java.sun.com/jsf/facelets">

<ui:composition>

	<!-- 
    PESQUISAR SOBRE FEEDBACK DE BOTAO AJAX=FALSE DEPOIS.
	<h:outputScript name="startAjaxStatus.js" library="javascript" />
 -->

	<h:panelGrid columns="5">
		<c:if test="#{pManagedBean.tipoOperacao != 'DETALHANDO'}">

			<p:commandButton id="btnSalvar" action="#{pManagedBean.doSalvar}"
				value="#{i18n.btnSalvar}" update="msgs,formLista" />

			<p:commandButton id="btnSalvarESair"
				actionListener="#{pManagedBean.doSalvarESair}"
				value="#{i18n.btnSalvarSair}" update="msgs,panelListagem,exportador,formLista" />

			<p:commandButton title="#{i18n['tooltip.btnPesquisar']}"
				id="btnPesquisar2" actionListener="#{pManagedBean.doPesquisar}"
				value="#{i18n.btnPesquisar}" update="panelListagem,exportador">
			</p:commandButton>

			<p:commandButton id="btnSalvarEDuplicar"
				action="#{pManagedBean.doSalvarEDuplicar}"
				value="#{i18n.btnSalvarEDuplicar}" update="msgs,formLista" />

			<p:commandButton id="btnCancelar" action="#{pManagedBean.doCancelar}"
				value="#{i18n.btnCancelar}" immediate="true" />

		</c:if>
		<c:if test="#{pManagedBean.tipoOperacao == 'DETALHANDO'}">
			<p:commandButton id="btnVoltar" action="#{pManagedBean.doVoltar}"
				value="#{i18n.btnVoltar}" immediate="true" />
		</c:if>
		<ui:include src="ajax-status.xhtml" />
	</h:panelGrid>

</ui:composition>

</html>